package com.huawei.fingerprint.slice;

import com.huawei.fingerprint.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.aafwk.content.Operation;
import ohos.agp.components.Component;

public class MainAbilitySlice extends AbilitySlice implements Component.ClickedListener {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_menu);
        init();
    }

    @Override
    public void init() {
        super.init();
        findComponentById(ResourceTable.Id_activity_menu_simple_view).setClickedListener(this);
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }

    @Override
    public void onClick(Component component) {
        switch (component.getId()) {
            case ResourceTable.Id_activity_menu_simple_view:
                System.out.println("view ///////////////////////");
                present(new SimpleView(), new Intent());
                break;
        }
    }
}
